package com.cwj.user.configuration;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

import java.util.Date;


@Component  //自动更新日期
public class MyMetaObjectHandler implements MetaObjectHandler {
    @Override
    public void insertFill(MetaObject metaObject) {
            strictInsertFill(metaObject,"registrationDate", Date.class,new Date());
    }

    @Override
    public void updateFill(MetaObject metaObject) {

    }

}
